package com.gkey.sole.base.service.impl;

import java.util.Map;

import org.springframework.stereotype.Service;

import com.gkey.core.dao.impl.EntityDaoImpl;
import com.gkey.core.util.MapUtil;
import com.gkey.sole.base.bean.CUser;
import com.gkey.sole.base.service.LoginService;

@Service
public class LoginServiceImpl extends EntityDaoImpl<CUser, Integer> implements LoginService{

	@Override
	public CUser getCUser(String loginname, String passwd) {
		CUser cuser = null;
		Map<String, Object> param = MapUtil.createQueryParam("loginname,passwd", loginname, passwd);
		cuser = super.get("LoginCUser", param);
		return cuser ;
	}

	@Override
	public CUser getCUser(String loginname) {
		CUser cuser = null;
		Map<String, Object> param = MapUtil.createQueryParam("loginname,passwd", loginname, null);
		cuser = super.get("LoginCUser", param);
		return cuser ;
	}

}
